<template>
  <iframe id="show-iframe" :src="designSrc" frameborder="0" name="showHere" scrolling="auto" :height="iframeHeight" width="100%" />
</template>

<script>
  import { getToken } from '@/utils/auth'
  import { config } from '@/utils'
  export default {
    data() {
      return {
        designSrc: null,
        visible: false,
        iframeHeight: '100%'
      }
    },
    computed: {
      token() {
        return 'Bearer ' + getToken()
      },
      backUrl() {
        return config.baseURL
      }
    },
    created() {
    },
    activated() {
    },
    mounted() {
      window.getMyVue = this
      this.init(this.$route.query.id)
    },
    methods: {
      init(id) {
        this.visible = true
        this.designSrc = process.env.BASE_URL + 'act/model/static/modeler.html?modelId=' + id
        // this.designSrc = '/act/model/static/modeler.html?modelId=' + id
      }
    }
  }
</script>
